import {ref} from "vue"
import {getProvinceCityByTree} from "@/apps/admin/api/filter";

/**
 * 地区树数据HOOK
 */
export function useProvinceCityByTree() {
    const region = ref([])

    getProvinceCityByTree().then(result => {
        if (result.code === 200) {
            region.value = result.data
        }
    })

    return {
        region
    }
}